package com.qf.smsplatfrom.pojo;


import org.springframework.util.ObjectUtils;

public class DirtyWord implements CheckNull {
  @Override
  public boolean isNull(CheckType type) {
    switch (type) {
      case ADD:
        return ObjectUtils.isEmpty(dirtyword);
      case UPDATE:
        return ObjectUtils.isEmpty(id)||ObjectUtils.isEmpty(dirtyword);
      case DELETE:
        ObjectUtils.isEmpty(id);
    }
    return CheckNull.super.isNull(type);
  }

  private Long id;
  private String dirtyword;
  private Long owntype;
  private Long creater;
  private TAdminUser tAdminUser;

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getDirtyword() {
    return dirtyword;
  }

  public void setDirtyword(String dirtyword) {
    this.dirtyword = dirtyword;
  }

  public Long getOwntype() {
    return owntype;
  }

  public void setOwntype(Long owntype) {
    this.owntype = owntype;
  }

  public Long getCreater() {
    return creater;
  }

  public void setCreater(Long creater) {
    this.creater = creater;
  }

  public TAdminUser gettAdminUser() {
    return tAdminUser;
  }

  public void settAdminUser(TAdminUser tAdminUser) {
    this.tAdminUser = tAdminUser;
  }
}
